#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main()
{
	int n;
	int step = 0;
	while (scanf("%d", &n) != EOF)
	{
		for (step = 0; n != 1; step++)
		{
			if (n == 1)
				break;

			if (n % 2 == 0)
				n = n / 2;
			else
				n = n * 3 + 1;

		}
		printf("%d\n", step);
	}
	return 0;
}